import axios from '../utils/request'

//验证是否可以发送
export const SignIn = (data) => {
    return axios({
        method: 'post',
        url: '/xpert-api/xpert/xp-client-auth/register',
        // url: 'http://ceshifanyi.haiba.tech/api/chat_topics/chat',
        data
    })
}
//发送验证码到邮箱
export const EmailCode = (data) => {
    return axios({
        method: 'put',
        url: '/xpert-api/xpert/xp-client-auth/send-register-email-code',
        // url: 'http://ceshifanyi.haiba.tech/api/chat_topics/chat',
        data
    })
}
//发送验证码到邮箱
export const RegisterilCode = (data) => {
    return axios({
        method: 'put',
        url: 'xpert-api/xpert/xp-client-auth/verify-register-email-code?code=' + data.code,
        // url: 'http://ceshifanyi.haiba.tech/api/chat_topics/chat',
        data
    })
}
//登录接口
export const Login = (data) => {
    return axios({
        method: 'post',
        url: 'xpert-api/xpert/xp-client-auth/login',
        // url: 'http://ceshifanyi.haiba.tech/api/chat_topics/chat',
        data
    })
}
//更换密码时邮箱验证码
export const ResetPassword = (data) => {
    return axios({
        method: 'put',
        url: `xpert-api/xpert/xp-client-auth/send-reset-pass-email-code?path=${data.path}&email=` + data.email,
        // url: 'http://ceshifanyi.haiba.tech/api/chat_topics/chat',
        data
    })
}